﻿using System;

namespace AbstractFactoryPattern
{
    internal class ColorFactory : IAbstractFactory
    {
        public IColor GetColor(string color)
        {
            if (color == null)
            {
                return null;
            }
            if (color.Equals("RED",StringComparison.CurrentCultureIgnoreCase))
            {
                return new Red();
            }
            else if (color.Equals("GREEN",StringComparison.CurrentCultureIgnoreCase))
            {
                return new Green();
            }
            return null;
        }

        public IShape GetShape(string shape)
        {
            throw new NotImplementedException();
        }
    }
}
